﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace Tunnels
{
    class Sprite
    {
        public Vector2 Position =  Vector2.Zero;
        public Texture2D mSpriteTexture;
        public Rectangle Size;
        public float Scale = 1.0f;

        public void LoadContent(ContentManager theContentManager, string theAssetName)
        {
            mSpriteTexture = theContentManager.Load<Texture2D>(theAssetName);
            Size = new Rectangle(0, 0, (int)(mSpriteTexture.Width * Scale), (int)(mSpriteTexture.Height * Scale));
        }

        public void Draw(SpriteBatch theSpriteBatch, float layerDepth)
        {
            theSpriteBatch.Draw(mSpriteTexture,
                Position,
                new Rectangle(0, 0, mSpriteTexture.Width, mSpriteTexture.Height),
                Color.White,
                0.0f,
                Vector2.Zero,
                Scale,
                SpriteEffects.None,
                layerDepth); 
        }
    }
}
